<# # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: Script is designed To Fetch the DNS details # Configuration Type - COMPUTER # Arguments - The value needs to be hardcoded inside the script #> # Get the current machine's domain name $domain = [System.Net.Dns]::GetHostEntry($env:COMPUTERNAME).HostName # Fetch DNS details $dnsDetails = Resolve-DnsName -Name $domain -Type ANY # Display the DNS details $dnsDetails | ForEach-Object { [PSCustomObject]@{ Name = $_.Name QueryType = $_.QueryType IPAddress = $_.IPAddress RecordType = $_.QueryType } } | Format-Table -AutoSize